package func.study.jvm.c1;

import java.util.ArrayList;
import java.util.List;

/**
 * java堆内存溢出
 * VM args: -Xms20m -Xmx20m -XX:+HeapDumpOnOutOfMemoryError
 * Created by chenyao on 2017/7/7.
 */
public class HeapOOM {

    public static void main(String[] args) {
        List<OOMObject> list = new ArrayList<>();
        while(true) {
            list.add(new OOMObject());
        }



    }
    static class OOMObject {

    }


}
